/******************************************************************************
 * Product: Adempiere ERP & CRM Smart Business Solution                       *
 * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved.                *
 * This program is free software, you can redistribute it and/or modify it    *
 * under the terms version 2 of the GNU General Public License as published   *
 * by the Free Software Foundation. This program is distributed in the hope   *
 * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           *
 * See the GNU General Public License for more details.                       *
 * You should have received a copy of the GNU General Public License along    *
 * with this program, if not, write to the Free Software Foundation, Inc.,    *
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.                     *
 * For the text or an alternative of this public license, you may reach us    *
 * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA        *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;

import java.sql.ResultSet;
import java.util.Properties;

/** Generated Model for hrm_vacationschedule
 *  @author Adempiere (generated) 
 *  @version Release 3.7.0LTS - $Id$ */
public class X_hrm_vacationschedule extends PO implements I_hrm_vacationschedule, I_Persistent 
{

	/**
	 *
	 */
	private static final long serialVersionUID = 20120719L;

    /** Standard Constructor */
    public X_hrm_vacationschedule (Properties ctx, int hrm_vacationschedule_ID, String trxName)
    {
      super (ctx, hrm_vacationschedule_ID, trxName);
      /** if (hrm_vacationschedule_ID == 0)
        {
			sethrm_vacationschedule_ID (0);
			setProcessing (false);
// N
        } */
    }

    /** Load Constructor */
    public X_hrm_vacationschedule (Properties ctx, ResultSet rs, String trxName)
    {
      super (ctx, rs, trxName);
    }

    /** AccessLevel
      * @return 3 - Client - Org 
      */
    protected int get_AccessLevel()
    {
      return accessLevel.intValue();
    }

    /** Load Meta Data */
    protected POInfo initPO (Properties ctx)
    {
      POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
      return poi;
    }

    public String toString()
    {
      StringBuffer sb = new StringBuffer ("X_hrm_vacationschedule[")
        .append(get_ID()).append("]");
      return sb.toString();
    }

	public org.eevolution.model.I_HR_Department getHR_Block() throws RuntimeException
    {
		return (org.eevolution.model.I_HR_Department)MTable.get(getCtx(), org.eevolution.model.I_HR_Department.Table_Name)
			.getPO(getHR_Block_ID(), get_TrxName());	}

	/** Set HR Block.
		@param HR_Block_ID HR Block	  */
	public void setHR_Block_ID (int HR_Block_ID)
	{
		if (HR_Block_ID < 1) 
			set_Value (COLUMNNAME_HR_Block_ID, null);
		else 
			set_Value (COLUMNNAME_HR_Block_ID, Integer.valueOf(HR_Block_ID));
	}

	/** Get HR Block.
		@return HR Block	  */
	public int getHR_Block_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_HR_Block_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.eevolution.model.I_HR_Department getHR_Department() throws RuntimeException
    {
		return (org.eevolution.model.I_HR_Department)MTable.get(getCtx(), org.eevolution.model.I_HR_Department.Table_Name)
			.getPO(getHR_Department_ID(), get_TrxName());	}

	/** Set Payroll Department.
		@param HR_Department_ID Payroll Department	  */
	public void setHR_Department_ID (int HR_Department_ID)
	{
		if (HR_Department_ID < 1) 
			set_Value (COLUMNNAME_HR_Department_ID, null);
		else 
			set_Value (COLUMNNAME_HR_Department_ID, Integer.valueOf(HR_Department_ID));
	}

	/** Get Payroll Department.
		@return Payroll Department	  */
	public int getHR_Department_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_HR_Department_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set hrm_vacationschedule.
		@param hrm_vacationschedule_ID hrm_vacationschedule	  */
	public void sethrm_vacationschedule_ID (int hrm_vacationschedule_ID)
	{
		if (hrm_vacationschedule_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_hrm_vacationschedule_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_hrm_vacationschedule_ID, Integer.valueOf(hrm_vacationschedule_ID));
	}

	/** Get hrm_vacationschedule.
		@return hrm_vacationschedule	  */
	public int gethrm_vacationschedule_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_vacationschedule_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public I_hrm_years gethrm_years() throws RuntimeException
    {
		return (I_hrm_years)MTable.get(getCtx(), I_hrm_years.Table_Name)
			.getPO(gethrm_years_ID(), get_TrxName());	}

	/** Set hrm_years.
		@param hrm_years_ID hrm_years	  */
	public void sethrm_years_ID (int hrm_years_ID)
	{
		if (hrm_years_ID < 1) 
			set_Value (COLUMNNAME_hrm_years_ID, null);
		else 
			set_Value (COLUMNNAME_hrm_years_ID, Integer.valueOf(hrm_years_ID));
	}

	/** Get hrm_years.
		@return hrm_years	  */
	public int gethrm_years_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_years_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Processed.
		@param Processed 
		The document has been processed
	  */
	public void setProcessed (boolean Processed)
	{
		set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
	}

	/** Get Processed.
		@return The document has been processed
	  */
	public boolean isProcessed () 
	{
		Object oo = get_Value(COLUMNNAME_Processed);
		if (oo != null) 
		{
			 if (oo instanceof Boolean) 
				 return ((Boolean)oo).booleanValue(); 
			return "Y".equals(oo);
		}
		return false;
	}

	/** Set Process Now.
		@param Processing Process Now	  */
	public void setProcessing (boolean Processing)
	{
		set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing));
	}

	/** Get Process Now.
		@return Process Now	  */
	public boolean isProcessing () 
	{
		Object oo = get_Value(COLUMNNAME_Processing);
		if (oo != null) 
		{
			 if (oo instanceof Boolean) 
				 return ((Boolean)oo).booleanValue(); 
			return "Y".equals(oo);
		}
		return false;
	}
}